package com.ruoyi.products.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.products.mapper.ProductsCategoryMapper;
import com.ruoyi.products.domain.ProductsCategory;
import com.ruoyi.products.service.IProductsCategoryService;

/**
 * 商品品类Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-06
 */
@Service
public class ProductsCategoryServiceImpl implements IProductsCategoryService 
{
    @Autowired
    private ProductsCategoryMapper productsCategoryMapper;

    /**
     * 查询商品品类
     * 
     * @param id 商品品类主键
     * @return 商品品类
     */
    @Override
    public ProductsCategory selectProductsCategoryById(Long id)
    {
        return productsCategoryMapper.selectProductsCategoryById(id);
    }

    /**
     * 查询商品品类列表
     * 
     * @param productsCategory 商品品类
     * @return 商品品类
     */
    @Override
    public List<ProductsCategory> selectProductsCategoryList(ProductsCategory productsCategory)
    {
        return productsCategoryMapper.selectProductsCategoryList(productsCategory);
    }

    /**
     * 新增商品品类
     * 
     * @param productsCategory 商品品类
     * @return 结果
     */
    @Override
    public int insertProductsCategory(ProductsCategory productsCategory)
    {
        return productsCategoryMapper.insertProductsCategory(productsCategory);
    }

    /**
     * 修改商品品类
     * 
     * @param productsCategory 商品品类
     * @return 结果
     */
    @Override
    public int updateProductsCategory(ProductsCategory productsCategory)
    {
        return productsCategoryMapper.updateProductsCategory(productsCategory);
    }

    /**
     * 批量删除商品品类
     * 
     * @param ids 需要删除的商品品类主键
     * @return 结果
     */
    @Override
    public int deleteProductsCategoryByIds(Long[] ids)
    {
        return productsCategoryMapper.deleteProductsCategoryByIds(ids);
    }

    /**
     * 删除商品品类信息
     * 
     * @param id 商品品类主键
     * @return 结果
     */
    @Override
    public int deleteProductsCategoryById(Long id)
    {
        return productsCategoryMapper.deleteProductsCategoryById(id);
    }
}
